A typical internet system model is divided into three layers: an interface layer, a service layer and a data layer. The interface layer is used for forwarding a request of a caller to the service layer and isolating the caller and a service system; the service layer is used for processing the request of the caller in accordance with a certain logical flow and usually returning a processing result; and the data layer is used for storing the processing result of the service layer for the next call. The service layer processes the request in a specific execution sequence that means multiple logical processing steps needed for processing one request, and will read data from the data layer or write an intermediate processing result to the data layer during the processing.
In accordance with characteristics of internet, parallel service layers are often deployed in multiple cities, or in different IDCs (Internet Data Centers) in a same city, or on different servers in a same IDC. At this point, when a same service request appears simultaneously in multiple parallel service layers, the same logical execution sequence will be executed crossly, which creates problems of logical confusion and data inconsistency. Thus, a synchronization mechanism is needed to enable the execution sequence of the same service request to be executed simultaneously among multiple service layers.
At present, there are synchronization schemes for inter-process communication such as a pipe, FIFO (First Input First Output), a named pipe, a shared memory, a message queue, semaphore, etc. However, all the existing synchronization schemes for inter-process communication deal with synchronization requirements among multiple processes deployed on the same server, but they are unable to deal with synchronization requirements of processes across cities, across IDCs and across servers.
As a result, a solution for processing the parallel services is urgently needed, to solve the problems mentioned above.